# 导包
import time

from selenium import webdriver
from selenium.webdriver.common.by import By
# 实例化浏览器驱动对象
driver = webdriver.Chrome()
# 打开测试网站
driver.get("http://192.168.0.108/Home/user/login.html")
# 定位元素的另外一种写法
driver.find_element(By.ID, "username").send_keys("13125056588")
driver.find_element(By.XPATH, "//*[@id=\"password\"]").send_keys("Dd112211")
driver.find_element(By.CSS_SELECTOR, "#verify_code").send_keys("8888")

# 等待3s
time.sleep(3)
# 退出浏览器
driver.quit()

